﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Senac.ProjetoIntegrador.EducacaoWeb.Models;
using Senac.Escola.Projeto.Models.Context;

namespace Senac.ProjetoIntegrador.EducacaoWeb.Controllers
{ 
    public class BoletimController : Controller
    {
        private Context db = new Context();

        public ViewResult Index()
        {
            var boletim = db.Boletim.Include(b => b.Atividade).Include(b => b.Aluno);
            return View(boletim.ToList());
        }

        [HttpGet]
        public ActionResult ExibirBoletim(int BoletimID)
        {
            return View(db.Boletim.Find(BoletimID));
        }
        
        protected override void Dispose(bool disposing)
        {
            db.Dispose();
            base.Dispose(disposing);
        }
    }
}